import request from '@/utils/request'

// 规则列表
export const menuList = () => {
  return request({
    method: 'get',
    url: '/sys/menu/listjson'
  })
}

// 编辑
export const menuInfo = (id) => {
  return request({
    method: 'GET',
    url: `/sys/menu/info/${id}`
  })
}

// 保存
export const menuSave = (data) => {
  return request({
    method: 'POST',
    url: '/sys/menu/save',
    data
  })
}

// 修改
export const menuUpdate = (data) => {
  return request({
    method: 'POST',
    url: '/sys/menu/update',
    data
  })
}

// 删除
export const menuDelete = (data) => {
  return request({
    method: 'POST',
    url: '/sys/menu/delete',
    data
  })
}
